<template>
    <div>
        <p>{{ ChildrenMessage }}</p>
    </div>
</template>
<script setup>
import { onBeforeUnmount, onUnmounted } from "vue";
const ChildrenMessage='我是子组件'
onBeforeUnmount(()=>{
    console.log('子组件卸载前');

})
onUnmounted(()=>{
    console.log('卸载后');
})

</script>